<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="button" id="btn">
    <script>
        // 1.事件源
        // 2.事件类型
        // 3.事件处理程序
        var btn = document.getElementById('btn');
        btn.onclick = function () {
            alert('点秋香');
        }

    </script>
</body>

</html>